Section 10 Computational Thinking

Chapter 47 - Thinking Abstractly

Computation thinking

Abstraction

Image 1
Un-abstracted image with too much deatil
Image 2
Abstracted Image

Abstraction Applied to High level programming languages

Abstraction is the most important feature of high level programming languages such as Python, C#, Java and hundreds of other languages written for different purposes. To understand why, we need to look at the different generations of programming languages:

A famous example of abstraction is the city Königsberg and its bridge problem.

Chapter 48 - Thinking Ahead

Computational Problems

At its most abstract level, a computational problem can be represented by a simple diagram:

Preconditions

In order to make sure a function never crashes, the function must pass a test-case for an empty input or a precondition must be specified

Advantages of Precondtions:

Nature and benefits of Caching

Caching is another aspect of thinking ahead, this time done automatically by the operating system rather than the programmer. Caching is the temporary storage of program instructions or data that have been used once and may be needed again shortly. The last few instructions of a program may be stored in cache memory for quick retrieval.

Chapter 49 - Thinking procedurally

Procedural Abstraction

Decomposition